package com.suncnpap.reader.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.app.util.database.mybatis.Page;
import com.suncnpap.reader.service.UnitService;
import com.suncnpap.reader.mapper.UnitMapper;
import com.suncnpap.reader.model.Unit;

/** 
 * 说明： 部门管理Service实现类
 * @version
 */
@Service("unitService")
public class UnitServiceImpl implements UnitService{

	
	@Autowired
	UnitMapper unitMapper;
	
	@Override
	public void add(Unit obj) {
		// TODO Auto-generated method stub
		unitMapper.add(obj);
	}

	@Override
	public void update(Unit obj) {
		// TODO Auto-generated method stub
		unitMapper.edit(obj);
	}

	@Override
	public void deleteById(String strId) {
		// TODO Auto-generated method stub
		unitMapper.deleteById(strId);
		
	}
	@Override
	public void deleteMore(String[] strIds) {
		// TODO Auto-generated method stub
		unitMapper.deleteMore(strIds);
	}

	@Override
	public Page list(Page page) {
		// TODO Auto-generated method stub
		List<Unit> list = unitMapper.datalistPage(page);
		page.setDataList(list);
		return page;
	}


	@Override
	public int findCount(Page page) {
		// TODO Auto-generated method stub
		return unitMapper.findCount(page);
	}

	@Override
	public Unit findById(String strId) {
		// TODO Auto-generated method stub
		return unitMapper.findById(strId);
	}
	
}

